<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <div><h1>Hello World</h1></div>
    {{reserveMsg}}:
    {{user.fullName}}
  </div>
  <script src="../../dist/vue.js"></script>
  <script>
    const vm = new Vue({
      el:"#app",
      data:{
        message:"HelloVue",
        user:{
          fistName:"Mir",
          lastName:"Mcgee",
          fullName:""
        }
      },
      computed:{
        reserveMsg(){
          return this.message.split("").reverse().join("")
        }
      },
      watch:{
        'user':{
          handler(newVal,oldVal){
            this.user.fullName = newVal.firstName + newVal.lastName
          },
          deep:true,
          immediate:true
        }
      }
    })
  </script>
</body>
</html>